const mongoose = require('mongoose');//引入mongoose
const errorQuestionsSchema = new mongoose.Schema({
    ErrorAnswer:String,
    errorQuestions_id: {
        type: mongoose.SchemaTypes.ObjectId,
        //关联集合模型，集合模型名在mongoose.model注册的名字
        ref:'questionsModel'
    },
    user_id: {
        type: mongoose.SchemaTypes.ObjectId,
        //关联集合模型，集合模型名在mongoose.model注册的名字
        ref:'userModel'
    }
});

const errorQuestionsModel = mongoose.model("errorQuestionsModel", errorQuestionsSchema, "ErrorQuestions");
module.exports = {errorQuestionsModel}